<%@ page import="java.util.jar.Attributes.Name"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" import="support.*,bean.*,java.util.*" %>
    
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Verification</title>
<link href="main.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
	// Get location from HTTP request
		// 
	Map name = (Map) session.getAttribute("name");
	Map citizen = (Map) session.getAttribute("citizen");
	Map residence = (Map) session.getAttribute("residence");
	Map address = (Map) session.getAttribute("address");
	Vector<Degree> degrees = (Vector<Degree>)session.getAttribute("degrees");
	String spec = (String)request.getParameter("spec_id");
	int spec_id = Integer.valueOf(spec);
	session.setAttribute("spec_id", spec_id);
	Vector<String> countries = (Vector<String>)application.getAttribute("countries");
	Vector universities = (Vector)application.getAttribute("universities");
	Vector<String> disciplines = (Vector<String>)application.getAttribute("disciplines");
	Vector<String> specializations = (Vector<String>)application.getAttribute("specializations");
%>
<h1>Your information</h1>
Name: <%= name.get("first_name") + " " + name.get("last_name") + " " + name.get("middle_name") %> <br />
Citizenship: <%= citizen.get("country") %> <br />
Residence: <%= residence.get("country") %> <br />
Address: <%= address.get("street") + " " + address.get("city") + " " +  address.get("state") + " " + address.get("zipcode")%> <br />
Phone: <%= address.get("countrycode") + " " + address.get("areacode") + " " + address.get("phone") %> <br />
--- <br />
<%
String location;
String university;
String discipline;
for(int i = 0;i<degrees.size();i++)
{
	int loc_id = degrees.get(i).getLocation();
	int univ_id = degrees.get(i).getUniv();
	Vector loc_vec = (Vector) universities.get(loc_id);
	location = (String) loc_vec.get(0);
	university = (String) ((Vector) loc_vec.get(1)).get(univ_id); 
	discipline = (String)disciplines.get(degrees.get(i).getDiscipline());
%>
	<em>Degree <%= i+1 %>:</em><br/>
	<b>Location:</b> <%= location %> <b>University:</b> <%= university %> <b>Major:</b> <%= discipline %> <br/>
	<b>Awarded Date:</b> <%= degrees.get(i).getMonth() %> / <%= degrees.get(i).getYear() %> <br/>
	<b>GPA:</b> <%= degrees.get(i).getGPA() %> <b>Title of degree:</b> <%= degrees.get(i).getTitle() %> <br/> 
	--- <br />
<%
}
%>
Specialization: <%= specializations.get(spec_id) %>
<hr>
<form name="form1" method="post" action="submit.jsp">
	<input type="submit" value="Submit Application">
	<input type="submit" value="Cancel">
</form>	
</body>
</html>